/*
 *@description:产品相关接口
 *@Author:@rennan
 *@Date:2024-06-27 16:02:03
 *@version: V1.0.0
*/

const express = require('express');
const router = express.Router();

const sql = require('../db/index');


router.get('/order',async(req,res)=>{
  //要分页，第一个查询那一页的数据，这一页数据有多少条 page = 1； pagesize=10
  let {page,pageSize} = req.query;
  let start = (page-1)*pageSize;
  let [order] = await sql.query(`SELECT * FROM jz_order limit ${start},${pageSize}`);
  res.send({
    code:200,
    message:'获取成功',
    data:order
  })
})



module.exports = router;

